package com.capacitacion.model;

import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "USERS")
public class User {

 private Long id;
 private String name;
 private String username;
 private String password;
 private List<Card> cards;
 
 @Id
 @GeneratedValue(strategy = GenerationType.IDENTITY)
 public Long getId() {
  return id;
 }
 
 
 @OneToMany
 @JoinColumn (name="use_id") 
 public List<Card> getCards() {
	return cards;
}

public void setCards(List<Card> cards) {
	this.cards = cards;
}





 public void setId(Long id) {
  this.id = id;
 }

 @Basic
 public String getName() {
  return name;
 }

 public void setName(String name) {
  this.name = name;
 }

 @Basic
 public String getUsername() {
  return username;
 }

 public void setUsername(String username) {
  this.username = username;
 }

 @Basic
 public String getPassword() {
  return password;
 }

 public void setPassword(String password) {
  this.password = password;
 }

 

}